package com.lincoln.framework.interfaces;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;

/**
 * 默认编码器
 *
 * @author lincoln
 */
public class BaseEncoder extends Encoder<BaseProtocol> {
    @Override
    protected void encode(ChannelHandlerContext ctx, BaseProtocol msg, ByteBuf out) throws Exception {
        out.writeBytes(msg.toBytes());
    }
}
